﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportGetJXSYQ2CSLSBP.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.FXModel.ReportGetJXSYQ2CSLSBP" %>

<%--经销商融资分析报表--%>
 <form id="pagerForm" method="post" action="FXModel/ReportGetJXSYQ2CSLSBP.aspx">
 <input type="hidden" name="LeaseCompany" value="<%=LeaseCompany %>" />
 <input type="hidden" name="AliasName" value="<%=AliasName %>" />
  <input type="hidden" name="ShowDetail" value="<%=ShowDetail %>" />
 <input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
 </form>
 <form id="ReportGetJXSYQ2CSLSBPFrom" runat="server" method="post" action="FXModel/ReportGetJXSYQ2CSLSBP.aspx" onsubmit="return navTabSearch(this);">
  <input type="hidden" id="ReportGetJXSYQ2CSLSBPFrom_ShowDetail" name="ShowDetail" value="<%=ShowDetail %>" />

<div class="pageContent" > 
    <div class="tabs" style=" border-width:0px!important;" currentIndex="<%=ShowDetail==0?"0":"1" %>" eventType="click">
        <div class="tabsHeader" style=" border-width:0px!important;">
		    <div class="tabsHeaderContent" style=" border-width:0px!important;">
			    <ul>
                    <li><a href="javascript:;" onclick="$('#ReportGetJXSYQ2CSLSBPFrom_ShowDetail').val('0'); navTabSearch(ReportGetJXSYQ2CSLSBPFrom)"><span>明细报表</span></a></li>
                    <li><a href="javascript:;" onclick="$('#ReportGetJXSYQ2CSLSBPFrom_ShowDetail').val('1'); navTabSearch(ReportGetJXSYQ2CSLSBPFrom)"><span>汇总报表</span></a></li>
               </ul>
		    </div>
	    </div>
	    <div class="tabsContent" style=" display:none;"></div>
    </div>

    <div class="pageHeader" style="overflow:hidden!important;">
    <div class="searchBar">
        <table class="searchContent">
        <%if (ShowDetail == 0)
          { %>
            <tr>
                <td>租赁公司：</td>
                <td> 
                    <select name="LeaseCompany" onchange="$('#ReportGetJXSYQ2CSLSBPFrom_AliasName').val(''); return navTabSearch(ReportGetJXSYQ2CSLSBPFrom)">
                    <%=GetLeaseCompany(LeaseCompany)%>
                    </select>
                </td>
                <td>经销商:</td>
                <td>
                    <select id="ReportGetJXSYQ2CSLSBPFrom_AliasName" name="AliasName" onchange="return navTabSearch(ReportGetJXSYQ2CSLSBPFrom)">
                        <%=GetAliasNameList()%>
                    </select>
                </td>
               
                <td>
                     <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive"><div class="buttonContent"><a href="<%=ExportExcelWebUrl %>/FXModel/ReportGetJXSYQ2CSLSBP.aspx?LeaseCompany=<%=HttpUtility.UrlEncode(LeaseCompany) %>" target="_blank" title="确定要导出吗?" style=" line-height:25px!important;" >导出</a></div></div>
                            </li>
                        </ul>
                    </div>
                </td>    
                <td>
                    逾期数据更新时间:<b style="color:red;"><%=IHISCETeim.BLL.FXFinanceLeaseController.GetLastRefresDate()%></b>
                </td>                
            </tr>
<%}
          else
          { %>
          <tr>
            <td>
                     <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive"><div class="buttonContent"><a href="<%=ExportExcelWebUrl %>/FXModel/ReportGetJXSYQ2CSLSBP.aspx?LeaseCompany=<%=HttpUtility.UrlEncode(LeaseCompany) %>" target="_blank" title="确定要导出吗?" style=" line-height:25px!important;" >导出</a></div></div>
                            </li>
                        </ul>
                    </div>
                </td>   
          </tr>
<%} %>

        </table>  
    </div>
</div>
<%if (ShowDetail == 0)
  { %>
    <table class="table" width="100%" layouth="90" >                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <thead >
        <tr  >
            <th >序号</th>
            <th >经销商</th>
            <th >合同号</th>
            <th>用户</th>
            <th  >机号</th>
            <th  >总期数</th>
            <th  >应付期数</th>
            <th  >已付期数</th>
            <th  >逾期期数</th>
            <th  >逾期金额</th>
            <th  >最近连续几个月未支付租金</th>   
            <th  >前6个月有逾期</th>
        </tr>
        </thead>
        <asp:repeater id="rpMenu" runat="server">
            <HeaderTemplate> 
            <tbody>            
            </HeaderTemplate>
            <ItemTemplate> 
                <tr >
                    <td ><%# Eval("序号")%></td>                        
			        <td><%# Eval("经销商")%></td>
                    <td><%# Eval("合同号")%></td>
                    <td><%# Eval("用户")%></td>
                    <td><%# Eval("机号")%></td>
                    <td><%# Eval("总期数")%></td>
                    <td><%# Eval("应付期数")%></td>
                    <td><%# Eval("已付期数")%></td>
                    <td><%# Eval("逾期期数")%></td>
                    <td><%# FormatDecimalToStrings(Eval("逾期金额"), "N")%></td>
                    <td><%# Eval("最近连续几个月未支付租金")%></td>
                    <td><%#　Convert.ToInt32(Eval("应付期数")) <= 6 && Convert.ToInt32(Eval("逾期期数"))>=1?"有":""%></td>
                    
		        </tr>
            </ItemTemplate>
            <FooterTemplate>
            </tbody>            
            </FooterTemplate>
        </asp:repeater>
        </table>
        <%}
  else
  { %>
    <table class="table" width="100%" layouth="90" >                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <thead >
        <tr  >            
            <th width="120" >经销商</th>
            <th >逾期台数</th>
            <th>逾期金额</th>
            <th >2月以上没付</th>
            <th >新客户前6期出现逾期</th>
        </tr>
        </thead>
        <asp:repeater id="rpMenu1" runat="server">
            <HeaderTemplate> 
            <tbody>            
            </HeaderTemplate>
            <ItemTemplate> 
                <tr >
                    <td><%# Eval("经销商")%></td>                        
			        <td><%# Eval("逾期台数")%></td>
                    <td><%# FormatDecimalToStrings(Eval("逾期金额"), "N")%></td>
                    <td><%# Eval("两月以上没付")%></td>
                    <td><%# Eval("新客户前6期出现逾期")%></td>                    
		        </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr >
                    <td style=" font-weight:bold;">总计:</td>                        
			        <td style=" font-weight:bold;"><%= dtc1[1].Rows[0]["逾期台数"].ToString()%></td>
                    <td style=" font-weight:bold;"><%= FormatDecimalToStrings(dtc1[1].Rows[0]["逾期金额"].ToString(), "N")%></td>
                    <td style=" font-weight:bold;"><%= dtc1[1].Rows[0]["两月以上没付"].ToString()%></td>
                    <td style=" font-weight:bold;"><%= dtc1[1].Rows[0]["新客户前6期出现逾期"].ToString()%></td>   
                </tr>
            </tbody>            
            </FooterTemplate>
        </asp:repeater>
        </table>
<%} %>
</div>

</form>